package cn.study.feignclient;

import cn.study.feignclient.interceptor.FeignGetRequestInterceptor;
import feign.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

@SpringBootApplication
//该注解表示在应用程序启动时，进行包扫描，所有的FeignClient的注解类进行处理
@EnableFeignClients
@EnableDiscoveryClient
@Import(value = FeignGetRequestInterceptor.class)
public class FeignClientApplication {

    public static void main(String[] args) {
        SpringApplication.run(FeignClientApplication.class, args);
    }


    @Bean
    Logger.Level feignLoggerLevel(){
        return Logger.Level.FULL;
    }
}
